Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix another crash scenario on recursive tuple types #17708

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

ilevkivskyi
Copy link
Member

Fixes #17691

This looks quite ad-hoc, but the only clean alternative is to remove the existing recursive types optimization we have in subtypes.py. But the best I can get without that optimization is -7% performance penalty (on self-check). So I think it is not worth it, since it is still a corner case.

cc @JukkaL

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JukkaL JukkaL merged commit 35679e2 into python:master Aug 30, 2024
19 checks passed
@ilevkivskyi ilevkivskyi deleted the rec-no-opt branch August 30, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RecursionError: maximum recursion depth exceeded
2 participants